package codegen;

public class TypeDescr extends AbstractDescr {

    private static final long serialVersionUID = 1L;
    private String name;
    private AbstractDescr alias;
    
    public TypeDescr(String name, AbstractDescr alias) {
        super(alias.getSize());
        this.name = name;
        this.alias = alias;
    }

    public void print() {
        trace("SimpleTypeDescr: " + name + " size: " + size);
        unindent();
    }
    
    @Override
    public String toString() {
        return name + super.toString();
    }

    @Override
    public AbstractDescr resolve() {
        return alias.resolve();
    }
}
